<?php
use yii\widgets\LinkPager;
use common\helpers\Url;
use common\helpers\Html;

$this->title = '单页管理';
$this->params['breadcrumbs'][] = ['label' => $this->title];
?>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title"><?= $this->title; ?></h3>
            </div>
            <div class="box-body table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th>用户名</th>
                        <th>代理</th>
                        <th>产品</th>
                        <th>方向</th>
                        <th>手数</th>
                        <th>开仓时间</th>
                        <th>开仓价格</th>
                        <th>保证金</th>
                        <th>盈亏</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($models as $key=>$model){ ?>
                        <tr id = <?= $model->member_id; ?>>
                            <td><?= $key + 1; ?></td>
                            <td><?= $model->username; ?></td>
                            <td><?= $model->username; ?></td>
                            <td><?= $model->symbol_cn; ?></td>
                            <td><?= $model->symbol_cmd; ?></td>
                            <td><?= $model->volume; ?></td>
                            <td><?= $model->open_time; ?></td>
                            <td><?= $model->open_price; ?></td>
                            <td><?= $model->deposit; ?></td>
                            <td><?= $model->profit; ?></td>
                            <td><?= $model->status; ?></td>
                            <td>平仓</td>
                        </tr>
                    <?php } ?>
                    </tbody>
                </table>
            </div>
            <div class="box-footer">
                <?= LinkPager::widget([
                    'pagination' => $pages
                ]);?>
            </div>
        </div>
    </div>
</div>